package com.ungao.framework.context;

import com.ungao.framework.exception.RegisterBeanException;
import com.ungao.framework.scanner.AnnotationScanner;

import java.util.List;
import java.util.Properties;

/**
 * 文件配置扫描方式应用上下文
 */
public class XmlPathConfigApplicationContext extends AbstractApplicationContext {

    public XmlPathConfigApplicationContext(String contextConfigLocation) {
        Properties contextConfig = this.scanner.scanConfig(contextConfigLocation);
        List<String> classNames = this.scanner.scanPackage(contextConfig.getProperty("scanPackage"));
        super.startup(classNames);
    }

    @Override
    protected void initApplicationContext(AnnotationScanner annotations) throws RegisterBeanException {

    }
}
